<table id="dataTable"></table>

{include file="system@block/layui" /}


<script type="text/html" id="createTimeTpl">
    <div>{{layui.util.toDateString(d.time * 1000,'yyyy-MM-dd') }}</div>
</script>
<script type="text/html" id="picTpl">
    <span class="lay-pic-container" src="{{ d.pic }}">
		<img src="{{ d.pic }}" class="lay-pic">
	</span>
</script>
<script type="text/javascript">
    layui.use(['table', 'tool'], function() {
        var table = layui.table;
        table.render({
            elem: '#dataTable'
            ,url: "{:url('', ['stall_feed_id'=>$stallFeedId])}" //数据接口
            ,page: true //开启分页
            ,skin: 'row'
            ,even: true
            ,limit: 20
            ,limits: [20,50,100,150,200]
            ,text: {
                none : '暂无相关数据'
            }
            ,toolbar: false
            ,defaultToolbar: ['filter', 'exports', 'print']
            ,cols: [[ //表头
                 {field: 'create_time', title: '操作时间',templet: '#createTimeTpl', width:160}
                ,{field: 'stall_cost_type', title: '费用单类型'}
                ,{field: 'stall_cost_money', title: '费用单金额'}
                ,{field: 'pic', title: '图片',templet:'#picTpl'}
                ,{field: 'remark', title: '备注'}
                
            ]]
        });
    });
</script>